package org.halk.spring_cloud_stream_demo.receiver;

import lombok.extern.slf4j.Slf4j;
import org.halk.spring_cloud_stream_demo.streamclient.StreamClient;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

@Component
@EnableBinding(value = {StreamClient.class})
@Slf4j
public class StreamReceiver {

    @StreamListener(StreamClient.INPUT)
    public void receive(String message) {
        log.info("StreamReceiver: {}", message);
    }
}
